import java.util.Scanner;

public class text5 {
    public static int Fib(int a){
        int sum1=0;
        int sum2=1;
        int add=0;
        if(a==1||a==2){
            return 1;
        }
       for(int i=1;i<a;i++){
           add=sum1+sum2;
           sum1=sum2;
           sum2=add;
       }
       return add;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x=sc.nextInt();
        int ret=Fib(x);
        System.out.println(ret);
    }
}
